//  this library.
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:hktk_app/util/view_util.dart';
import 'package:hktk_app/widget/login/reset_password_widget.dart';
import 'package:hktk_app/widget/page_title_widget.dart';

/// 修改密码页面
class UpdatePasswordPage extends StatefulWidget {
  const UpdatePasswordPage({super.key});

  @override
  State<UpdatePasswordPage> createState() => _UpdatePasswordPageState();
}

class _UpdatePasswordPageState extends State<UpdatePasswordPage> {
  late BuildContext _context;

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    _context = context;
    return Scaffold(
      backgroundColor: colorWhite2,
      body: Column(
        children: [
          PageTitleWidget(
            name: "修改密码",
            pageContext: context,
          ),
          Expanded(child: _content()),
        ],
      ),
    );
  }

  /// 内容显示方法
  _content() {

    double width = ScreenUtil().screenWidth;
    double height = ScreenUtil().screenHeight;
    double top = ScreenUtil().statusBarHeight;
    double height2 = height - top - 88;
    return SizedBox(
      width: width,
      height: height2,
      child: SingleChildScrollView(
        child: SizedBox(
          width: width,
          height: height2,
          child: const ResetPasswordWidget(
            phoneStr: "",
            title: "修改密码",
            resetPass: true,
          ),
        ),
      ),
    );
  }
}
